<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
		<title>图标按钮</title>
		<!-- ExtJS library: all widgets -->
		<script type="text/javascript">
		function change(btn) {
			btn.setIcon("../../../images/loading.gif");
		}
		
		function submit(){  
			alert("提交成功");
		}
		</script>
		<cw:base />
	</head>
	<body>
	<ul>
		<li>
			<b>图标按钮是在普通按钮上添加图标渲染</b>
		</li>
		<li>
			<b>普通按钮控件的icon属性为图标URL，iconCls属性为图标应用的CSS</b>
		</li>
	</ul>
	<br/>
	<br/>
	<ul>
		<li>
		纯图标按钮，设置icon为显示图标，设置iconCls为x-btn-icon
		<table>
			<tr>
				<td>
					<cw:button icon="../../..//images/confirm.gif" iconCls="x-btn-icon" onclick="change(this)" ></cw:button>
				</td>
			</tr>
		</table>
		<br/>
		</li>
		<li>
		文本+图标按钮，设置text为显示文本，icon为显示图标，设置iconCls为x-btn-text-icon
		<table>
			<tr>
				<td>
					<cw:button text="提交" icon="../../../images/confirm.gif" iconCls="x-btn-text-icon" onclick="submit()" ></cw:button>
				</td>
			</tr>
		</table>
		<br/>
		</li>
	</ul>
	</body>
	<cw:theme></cw:theme>
</html>